import VueI18n from "vue-i18n"
import Vue from 'vue'
Vue.use(VueI18n)

const messages = {
  en: {
    enter_match: {
      own_pass: 'Personal Channels',
      guess_pass: 'Guest Channel',
      org_pass: 'Enterprise Channel',
      team_pass: 'Group Channel'
    },
    menus: {
      home: 'Home',
      match_center: 'Event Center',
      centre: 'Venue Tour',
      enter_match: 'Entry Registration',
      live: 'Live Video',
      news: 'News',
      about_match: 'About Contest',
      forum: 'Industry BBS',
      cooper: 'Competition Cooperation',
      exp: 'Public Experience'
    },
    bottom: {
      sponsor: 'Sponsor & Organizer',
      orgs: ['Equipment Industry Development Center, Ministry of Industry and Information Technology',
        'Beijing Municipal Bureau of Economy and Information Technology',
        'China Electronic Information Industry Development Institute (CCID Research Institute)',
        "People's Government of Shunyi District, Beijing",
        "Machinery Sub-council, China Council for the Promotion of International Trade",
        "China Electrotechnical Society"
      ],
      wx: 'Wechat Official Account',
      wb: 'Microblog',
      concat_us: 'Contact Us',
      concat_link: [
        'Media group contact information: <br> 139 1023 0369 <br> Email：wicv002@ccidmedia.com',
        'Organizing Committee Contact: <br> 139 1023 0369 <br> Email：wicv002@ccidmedia.com'
      ]
    }
  },
  zh: {
    enter_match: {
      own_pass: '个人通道',
      guess_pass: '嘉宾通道',
      org_pass: '企业通道',
      team_pass: '团体通道'
    },
    menus: {
      home: '首页',
      match_center: '赛事中心',
      centre: '会场导览',
      enter_match: '参赛报名',
      live: '视频直播',
      news: '新闻资讯',
      about_match: '关于大赛',
      forum: '产业论坛',
      cooper: '大赛合作',
      exp: '公众体验'
    },
    bottom: {
      sponsor: '主办&承办单位',
      orgs: ['工业和信息化部装备工业发展中心', '北京市经济和信息化局', '中国电子信息产业发展研究院（赛迪研究院）',
        '北京市顺义区人民政府', '中国国际贸易促进委员会机械行业分会', '中国电工技术学会'
      ],
      wx: '微信公众号',
      wb: '微博',
      concat_us: '与我们联系',
      concat_link: [
        '媒体组联系方式: <br> 139 1023 0369 <br> 邮箱：wicv002@ccidmedia.com',
        '会务组联系方式: <br> 139 1023 0369 <br> 邮箱：wicv002@ccidmedia.com'
      ]
    },

  }
}
let state = window.localStorage.getItem('state')
if (state) {
  state = JSON.parse(state)
} {
  state = {
    lang: 'zh'
  }
}
let locale = 'zh'
if ('lang' in state) {
  locale = state.lang
}
export const i18n = new VueI18n({
  locale: locale, // 设置地区
  messages, // 设置地区信息
})